package com.day11.study.thread_demo;

class Type1Thread extends Thread {
    @Override
    public void run() {
        while (true) {
            System.out.println(Thread.currentThread().getName());
        }
    }
}

public class Type1 {
    public static void main(String[] args) {
        Thread t1 = new Type1Thread();
        t1.start();
        try {
            t1.join(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        while (true) {
            System.out.println(Thread.currentThread().getName());
        }
    }
}
